package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.dto.setmeal.SetMealDTO;
import com.sky.result.PageResult;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author 褚金龙
 * @Date 2024/9/4 23:17
 */
@Mapper
public interface SetmealDishMapper {

    /**
     * 根据菜品id来查询对应的套餐id
     * @param dishIds
     * @return
     */

    List<Long> getSetmealIdsByDishIds(List<Long> dishIds);




    /**
     * 添加菜品后写入菜品id
     *
     */
    @Insert("insert into setmeal_dish(dish_id)value (#{dishId})")
    void insert(Long dishId);


    /**
     * 插入套餐id
     * @param id
     */
    @Insert("insert into setmeal_dish(setmeal_id)value (#{id})")
    void setMealInsert(Long id);

    /**
     * 套餐总览
     * @return
     */
    Integer countByMap();
}
